<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->title;?></title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/load.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />
<!--colorbox-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/jquery.colorbox.js"></script>
<link href="<?php echo $this->baseUrl;?>/files/admin/js/colorbox.jquery/colorbox2.css" rel="stylesheet" type="text/css"/>
</head>

<body>
	<div id="main">
		<div id="topMenu">
			<div id="navigation">当前位置：接口错误列表</div>
			<div id="topOtherMenu"></div>
		</div>
		<div id="body">
			<div id="search">
				<form id="searchForm" name="searchForm" method="post" action="<?php echo $this->projectUrl();?>">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td>
								操作系统：
                                <input name="osName" type="text" class="input" id="osName" size="17" value="<?php echo htmlspecialchars($this->vars['osName']);?>" />
  								客户端版本：
                                <input name="appVersion" type="text" class="input" id="appVersion" size="17" value="<?php echo htmlspecialchars($this->vars['appVersion']);?>" />
								&nbsp;错误编号：
								<input name="errorNo" type="text" class="input" id="errorNo" size="17" value="<?php echo htmlspecialchars($this->vars['errorNo']);?>" />
								&nbsp;错误描述关键字：
								<input name="message" type="text" class="input" id="message" size="17" value="<?php echo htmlspecialchars($this->vars['message']);?>" /></td>
					  </tr>
						<tr>
							<td>
								错误类型：
								<label><input type="radio" name="type" id="type" value="" <?php echo $this->vars['type'] == '' ? ' checked' : '';?>/> 不限</label>
                                <label><input type="radio" name="type" id="type2" value="param" <?php echo $this->vars['type'] == 'param' ? ' checked' : '';?>/> 参数错误</label>
                                <label><input type="radio" name="type" id="type3" value="dbquery" <?php echo $this->vars['type'] == 'dbquery' ? ' checked' : '';?>/> 数据库查询错误</label>
								&nbsp;时间范围：
				        <input name="startTime" type="text" class="input" id="startTime" size="17" value="<?php echo htmlspecialchars($this->vars['startTime']);?>" />
								<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M:00","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});</script> 

								-
								<input name="endTime" type="text" class="input" id="endTime" size="17" value="<?php echo htmlspecialchars($this->vars['endTime']);?>" />
								<script type="text/javascript">Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M:00","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});</script> 
								&nbsp;
								<input name="search" type="submit" id="search2" value="查找" class="button" />
							</td>
					  </tr>

					</table>
				</form>
			</div>
            
            
			<div id="content">
				<div style="display:none;">
<?php
foreach($this->rows as $index=>$row) {
	parse_str($row['params'], $params);
?>
					<div class="colorbox" id="paramsList<?php echo $index;?>">
						<div class="subject">
							<div class="title">参数</div>
							<div class="close" onClick="$(document).colorbox.close();">&nbsp;</div>
						</div>
						<div>
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
								<tr>
									<td>&nbsp;参数名称</td>
									<td>参数值</td>
								</tr>
<?php
	foreach($params as $key=>$value) {
?>
								<tr>
									<td>&nbsp;<?php echo $key;?></td>
									<td><?php echo trim($value) != '' ? $value : '&nbsp;';?></td>
								</tr>
<?php
	}
?>
							</table>
						</div>
					</div>
<?php
}
?>
				</div>
				<form id="listForm" name="listForm" method="post" action="">
					<table class="table">
						<tr class="subject">
							<td>错误类型</td>
							<td>操作系统</td>
							<td>客户端版本</td>
							<td>错误编号</td>
							<td>错误描述</td>
							<td>时间</td>
							<td align="center">参数</td>
						</tr>
<?php
foreach($this->rows as $index=>$row) {
?>
						<tr class="dataLine">
							<td><?php if ($row['type'] == 'param') {echo '参数错误';} else if ($row['type'] == 'dbquery')  {echo '数据库查询错误';};?></td>
						  <td><?php echo !empty($row['osName']) ? $row['osName'] : '&nbsp;';?></td>
						  <td><?php echo !empty($row['appVersion']) ? $row['appVersion'] : '&nbsp;';?></td>
							<td><?php echo $row['errorNo'];?></td>
							<td><?php echo str_replace("||", "<br/>", $row['message']);?></td>
						  	<td><?php echo $row['addTime'];?></td>
							<td><a href="javascript:void(0);" onclick="$(document).ready(function(){$.fn.colorbox({inline:true, href:'#paramsList<?php echo $index;?>'});});">查看</a></td>
						</tr>
<?php
}
?>
				  </table>
<table class="controlTable">
						<tr>
							<td colspan="6" align="right" class="paginator"><?php echo $this->pageString;?></td>
					</tr>
				  </table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>